import { Channel } from '@/types/data'

// 封装频道相关的本地存储操作
const CHANNELS_KEY = 'geek_channels_95'

// 取
export function getChannels(): Channel[] {
  return JSON.parse(localStorage.getItem(CHANNELS_KEY) || '[]')
}

// 存
export function setChannels(channels: Channel[]) {
  localStorage.setItem(CHANNELS_KEY, JSON.stringify(channels))
}
